<div class="item pdt16 pdb16"><div class="fr">
	<img width="10" height="15" class="fl bder_d5 fl pdt4 pdb4 pdl7 pdr9 mgl5 cursor_poiter" onclick="LeftClick3('spnumberpage','sptotalpage','boxoutsize');" src="<?php echo base_url(); ?>public/images/arrow_01.jpg">
    <?php for($i=1;$i<=ceil($total["total"]/10);$i++){?>
		<div id="divpager<?php echo $i ?>" class="bder_d5 fl pdt4 pdb4 txt_center w24 mgl5 black cursor_poiter" onclick="loaddata('<?php echo $i ?>','boxoutsize',postdata,'spnumberpage','sptotalpage','getajax_hotel_search_result',listroomhotel);"><?php echo $i ?></div> 
	<?php
	}?>
    
    <img width="10" height="15" class="fl bder_d5 fl pdt4 pdb4 pdl9 pdr7 mgl5 cursor_poiter" src="<?php echo base_url(); ?>public/images/arrow_03.png" onclick="RightClick3('spnumberpage','sptotalpage','boxoutsize','getajax_hotel_search_result',listroomhotel,'<?php echo $_GET['provide'] ?>','<?php echo $_GET['from'] ?>','<?php echo $_GET['to'] ?>','<?php echo intval($_GET['room']); ?>','<?php echo intval($_GET['adult']); ?>','<?php echo intval($_GET['child']); ?>');"> </div></div>
        <script>

		
		function loaddata(page,idnameboxoutsize,postdata,idnumberpage,idtotalpage,namepager,namearray){
			for(var i=1;i<=page;i++){
				if(namearray[i]==false){
					//load dữ liệu ajax rồi cộng vào html
					$.post(link+'home/index/'+namepager+'?pagenumber='+page,postdata,function(data){		
					document.getElementById(idnameboxoutsize).innerHTML+=data;		                    
					});	
					namearray[i]=true;
				}else{
					
				}
				
			}
			//hiển thị page đúng		
						
			if($("#"+idnumberpage).html()<page){
				$("#"+idnameboxoutsize).css('width',660*$('#'+idtotalpage).html()).removeClass("item");
				$("#"+idnameboxoutsize).animate({'left':'-='+(660*(page-$("#"+idnumberpage).html()))},1200);
			}else if($("#"+idnumberpage).html()>page){
				$("#"+idnameboxoutsize).animate({'left':'+='+(660*($("#"+idnumberpage).html()-page))},1200);
			}
			$("#"+idnumberpage).html(page);
			
		}
		</script>
